﻿using JX.Core.Entity;
using JX.Infrastructure.Field;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Linq;
using System.Threading.Tasks;

namespace JXWebSite.Areas.Admin.Models.UserViewModels
{
	/// <summary>
	/// 会员视图类
	/// </summary>
	public class UserViewModel
	{
		/// <summary>
		/// 会员ID
		/// </summary>
		public int id { get; set; } = 0;
		/// <summary>
		/// 会员组名称
		/// </summary>
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public string GroupName { get; set; } = string.Empty;
		/// <summary>
		/// 会员实体类
		/// </summary>
		public UsersEntity Users { get; set; }
		/// <summary>
		/// 联系人实体类
		/// </summary>
		public ContacterEntity Contacter { get; set; }
		/// <summary>
		/// 紧急联系人
		/// </summary>
		public IList<EmergencyContactEntity> EmergencyContactList { get; set; }
		/// <summary>
		/// 家庭成员
		/// </summary>
		public FamilyEntity FamilyEntity { get; set; }
		/// <summary>
		/// 联系人扩展数据
		/// </summary>
		public DataTable ContacterOption { get; set; }
		/// <summary>
		/// 联系人扩展字段列表
		/// </summary>
		public IList<FieldInfo> ContacterOptionFieldList { get; set; }
		/// <summary>
		/// 商户实体
		/// </summary>
		public CompanyEntity Company { get; set; }
		/// <summary>
		/// 商户扩展数据
		/// </summary>
		public DataTable CompanyOption { get; set; }
		/// <summary>
		/// 商户扩展字段列表
		/// </summary>
		public IList<FieldInfo> CompanyOptionFieldList { get; set; }
		/// <summary>
		/// 商户成员
		/// </summary>
		public DataTable CompanyMemberInfo { get; set; }
		/// <summary>
		/// 是否显示商户
		/// </summary>
		public bool ShowCompany { get; set; } = false;
		/// <summary>
		/// AddToCompany：添加商户
		/// </summary>
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public string Action { get; set; } = string.Empty;
	}
}
